Optimal. Leaf size=90 \[ -\frac {2 a \sqrt {1-a^2 x^2}}{x}+\frac {\sqrt {1-a^2 x^2}}{x^2 (1-a x)}-\frac {3 \sqrt {1-a^2 x^2}}{2 x^2}-\frac {3}{2} a^2 \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {857, 835, 807, 266, 63, 208} \begin {gather*} -\frac {2 a \sqrt {1-a^2 x^2}}{x}+\frac {\sqrt {1-a^2 x^2}}{x^2 (1-a x)}-\frac {3 \sqrt {1-a^2 x^2}}{2 x^2}-\frac {3}{2} a^2 \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 208
Rule 266
Rule 807
Rule 835
Rule 857
Rubi steps
\begin {align*} \int \frac {1}{x^3 (1-a x) \sqrt {1-a^2 x^2}} \, dx &=\frac {\sqrt {1-a^2 x^2}}{x^2 (1-a x)}-\frac {\int \frac {-3 a^2-2 a^3 x}{x^3 \sqrt {1-a^2 x^2}} \, dx}{a^2}\\ &=-\frac {3 \sqrt {1-a^2 x^2}}{2 x^2}+\frac {\sqrt {1-a^2 x^2}}{x^2 (1-a x)}+\frac {\int \frac {4 a^3+3 a^4 x}{x^2 \sqrt {1-a^2 x^2}} \, dx}{2 a^2}\\ &=-\frac {3 \sqrt {1-a^2 x^2}}{2 x^2}-\frac {2 a \sqrt {1-a^2 x^2}}{x}+\frac {\sqrt {1-a^2 x^2}}{x^2 (1-a x)}+\frac {1}{2} \left (3 a^2\right ) \int \frac {1}{x \sqrt {1-a^2 x^2}} \, dx\\ &=-\frac {3 \sqrt {1-a^2 x^2}}{2 x^2}-\frac {2 a \sqrt {1-a^2 x^2}}{x}+\frac {\sqrt {1-a^2 x^2}}{x^2 (1-a x)}+\frac {1}{4} \left (3 a^2\right ) \operatorname {Subst}\left (\int \frac {1}{x \sqrt {1-a^2 x}} \, dx,x,x^2\right )\\ &=-\frac {3 \sqrt {1-a^2 x^2}}{2 x^2}-\frac {2 a \sqrt {1-a^2 x^2}}{x}+\frac {\sqrt {1-a^2 x^2}}{x^2 (1-a x)}-\frac {3}{2} \operatorname {Subst}\left (\int \frac {1}{\frac {1}{a^2}-\frac {x^2}{a^2}} \, dx,x,\sqrt {1-a^2 x^2}\right )\\ &=-\frac {3 \sqrt {1-a^2 x^2}}{2 x^2}-\frac {2 a \sqrt {1-a^2 x^2}}{x}+\frac {\sqrt {1-a^2 x^2}}{x^2 (1-a x)}-\frac {3}{2} a^2 \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 63, normalized size = 0.70 \begin {gather*} \frac {1}{2} \left (\frac {\left (-4 a^2 x^2+a x+1\right ) \sqrt {1-a^2 x^2}}{x^2 (a x-1)}-3 a^2 \tanh ^{-1}\left (\sqrt {1-a^2 x^2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.55, size = 76, normalized size = 0.84 \begin {gather*} \frac {\left (-4 a^2 x^2+a x+1\right ) \sqrt {1-a^2 x^2}}{2 x^2 (a x-1)}+3 a^2 \tanh ^{-1}\left (\sqrt {-a^2} x-\sqrt {1-a^2 x^2}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 97, normalized size = 1.08 \begin {gather*} \frac {2 \, a^{3} x^{3} - 2 \, a^{2} x^{2} + 3 \, {\left (a^{3} x^{3} - a^{2} x^{2}\right )} \log \left (\frac {\sqrt {-a^{2} x^{2} + 1} - 1}{x}\right ) - {\left (4 \, a^{2} x^{2} - a x - 1\right )} \sqrt {-a^{2} x^{2} + 1}}{2 \, {\left (a x^{3} - x^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.21, size = 213, normalized size = 2.37 \begin {gather*} -\frac {{\left (a^{3} + \frac {3 \, {\left (\sqrt {-a^{2} x^{2} + 1} {\left | a \right |} + a\right )} a}{x} - \frac {20 \, {\left (\sqrt {-a^{2} x^{2} + 1} {\left | a \right |} + a\right )}^{2}}{a x^{2}}\right )} a^{4} x^{2}}{8 \, {\left (\sqrt {-a^{2} x^{2} + 1} {\left | a \right |} + a\right )}^{2} {\left (\frac {\sqrt {-a^{2} x^{2} + 1} {\left | a \right |} + a}{a^{2} x} - 1\right )} {\left | a \right |}} - \frac {3 \, a^{3} \log \left (\frac {{\left | -2 \, \sqrt {-a^{2} x^{2} + 1} {\left | a \right |} - 2 \, a \right |}}{2 \, a^{2} {\left | x \right |}}\right )}{2 \, {\left | a \right |}} - \frac {\frac {4 \, {\left (\sqrt {-a^{2} x^{2} + 1} {\left | a \right |} + a\right )} a {\left | a \right |}}{x} + \frac {{\left (\sqrt {-a^{2} x^{2} + 1} {\left | a \right |} + a\right )}^{2} {\left | a \right |}}{a x^{2}}}{8 \, a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 94, normalized size = 1.04 \begin {gather*} -\frac {3 a^{2} \arctanh \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}\right )}{2}-\frac {\sqrt {-\left (x -\frac {1}{a}\right )^{2} a^{2}-2 \left (x -\frac {1}{a}\right ) a}\, a}{x -\frac {1}{a}}-\frac {\sqrt {-a^{2} x^{2}+1}\, a}{x}-\frac {\sqrt {-a^{2} x^{2}+1}}{2 x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -\int \frac {1}{\sqrt {-a^{2} x^{2} + 1} {\left (a x - 1\right )} x^{3}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.61, size = 105, normalized size = 1.17 \begin {gather*} \frac {a^3\,\sqrt {1-a^2\,x^2}}{\left (x\,\sqrt {-a^2}-\frac {\sqrt {-a^2}}{a}\right )\,\sqrt {-a^2}}-\frac {a\,\sqrt {1-a^2\,x^2}}{x}-\frac {\sqrt {1-a^2\,x^2}}{2\,x^2}+\frac {a^2\,\mathrm {atan}\left (\sqrt {1-a^2\,x^2}\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {1}{a x^{4} \sqrt {- a^{2} x^{2} + 1} - x^{3} \sqrt {- a^{2} x^{2} + 1}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________